﻿<%@ Control Language="C#" Inherits="Yuanlin.Business.HelpCenterEditControl, Yuanlin.Business" AutoEventWireup="true" %>

<%@Register tagPrefix="ctrl" tagName="Editor" src="~/themes/default/skins/Skin-HtmlEditor.ascx" %>

<script type="text/javascript">
<!--
    function CheckValue()
    {
        var leftMenuName = document.getElementById('<%= leftMenuNameValuedTextBox.ClientID %>');
        if(leftMenuName.value.Trim().length==0)
        {
            alert('请填写菜单名！');
            leftMenuName.focus();
            return false;
        }
        
        var content = window.frames['Editor'].window.frames["HtmlEditor"].document.getElementsByTagName("BODY")[0].innerHTML;
        var strContent = content.toText().Trim();
        if(strContent == null || strContent == '')
        {
            alert('请填写内容！');
            return false;
        }
        
        var orderBy = document.getElementById('<%= orderByValuedTextBox.ClientID %>');
        if(orderBy.value.Trim().length==0)
        {
            alert('请填写排序号！');
            orderBy.focus();
            return false;
        }
        if(!isNumeral(orderBy.value.Trim()))
        {
            alert('排序号必须为数字！');
            orderBy.focus();
            return false;
        }
        
        return true;
    }
//-->
</script>
<div class="AdminArea">
    <fieldset>
        <legend><nwap:ResourceLiteral runat="server" ResourceName="System_Applications_Yuanlin_EditHelpCenter" ResourceFile="ControlPanelResources.xml"></nwap:ResourceLiteral></legend>
		
        <div class="FormRow">
           <div class="LargerFieldNameRequireCharacter">
                <nwap:ResourceLabel runat="Server" CssClass="RedColor" ResourceFile="ControlPanelResources.xml" ResourceName="RequireCharacter" />
                <nwap:ResourceLabel runat="Server" ControlToLabel="leftMenuNameValuedTextBox" ResourceFile="ControlPanelResources.xml" ResourceName="System_Applications_Yuanlin_HelpCenter_LeftMenuName" />
            </div>
            <nwap:ValuedTextBox Runat="server" CssClass="InputField MiddleWidth" id="leftMenuNameValuedTextBox" />
        </div>
        <div class="FormRow">
            <nwap:ResourceLabel CssClass="FieldName" runat="Server" ControlToLabel="orderByValuedTextBox" ResourceFile="ControlPanelResources.xml" ResourceName="System_Applications_Yuanlin_HelpCenter_OrderBy" />
            <nwap:ValuedTextBox Runat="server" CssClass="InputField MiddleWidth" id="orderByValuedTextBox" />
        </div>
        <div class="FormRow">
            <div class="LargerFieldNameRequireCharacter">
                <nwap:ResourceLabel runat="Server" CssClass="RedColor" ResourceFile="ControlPanelResources.xml" ResourceName="RequireCharacter" />
                <nwap:ResourceLabel runat="Server" ControlToLabel="descriptionValuedEditor" ResourceFile="ControlPanelResources.xml" ResourceName="System_Applications_Yuanlin_HelpCenter_Body" />
            </div>
            <br /><br /><ctrl:Editor Runat="server" Width="100%" Height="250px" id="descriptionValuedEditor" />
        </div>


        <div class="FormRow SubmitButtonRow">
            <nwap:Resourcebutton id="SaveButton" ResourceName="Save" CssClass="Button" Runat="server" OnClientClick="return CheckValue()"></nwap:Resourcebutton>&nbsp;&nbsp;&nbsp;&nbsp;
            <nwap:Resourcebutton id="BackButton" ResourceName="Back" CssClass="Button" Runat="server"></nwap:Resourcebutton>
        </div>	
    </fieldset>
</div> 